-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix TimeStamp and TimeSpan class to use class_from_element method #266
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #266 +/- ##
========================================
Coverage 92.82% 92.83%
========================================
Files 34 34
Lines 4810 4812 +2
========================================
+ Hits 4465 4467 +2
Misses 345 345
☔ View full report in Codecov by Sentry. |
if when is not None: | ||
self.timestamp = KmlDateTime.parse(when.text) | ||
kwargs["timestamp"] = KmlDateTime.parse(when.text) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file contains at least one console log. Please remove any present.
WatermelonAI SummaryThis PR fixes the TimeStamp and TimeSpan class by using the class_from_element method. This improves the business logic by ensuring proper handling and processing of time-related data. GitHub PRs
Click here to login to Jira |
for more information, see https://pre-commit.ci
WatermelonAI SummaryThis PR fixes the TimeStamp and TimeSpan class to utilize the class_from_element method. It also includes auto fixes from pre-commit.com hooks. These changes align with the business logic of improving the efficiency and accuracy of class implementation. No results found in GitHub PRs :( Click here to login to Jira |
@@ -177,11 +180,25 @@ def etree_element( | |||
when.text = str(self.timestamp) | |||
return element | |||
|
|||
def from_element(self, element: Element) -> None: | |||
super().from_element(element) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file contains at least one console log. Please remove any present.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some food for thought. View full project report here.
examples/UsageExamples.py
Outdated
@@ -17,7 +17,7 @@ def print_child_features(element): | |||
|
|||
k = kml.KML() | |||
|
|||
with open(fname) as kml_file: # noqa: ENC001 | |||
with open(fname) as kml_file: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UnicodeDecodeError
can occur if the content of the file has characters incompatible with the OS's default encoding. Python uses the OS's default text encoding on the content because encoding
is not set. Read more.
PR Summary
|
id: Optional[str] = None, | ||
target_id: Optional[str] = None, | ||
timestamp: Optional[KmlDateTime] = None, | ||
) -> None: | ||
super().__init__(ns=ns, id=id, target_id=target_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file contains at least one console log. Please remove any present.
WatermelonAI SummaryThis Pull Request aims to fix encoding issues in the KML file reading process. It also updates the TimeStamp and TimeSpan classes to utilize the class_from_element method. Pre-commit.ci was used to automatically fix issues from the pre-commit.com hooks. The changes in this PR will improve the accuracy and reliability of processing KML files in the application. GitHub PRs
Click here to login to Jira |
No description provided.